SELECT ASCII('A')
FROM DUAL;

SELECT CHR('65')
FROM DUAL;
+---------+
|CHR('65')|
+---------+
|A        |
+---------+


SELECT CONCAT('A', 'BC')
FROM DUAL;
+----------------+
|CONCAT('A','BC')|
+----------------+
|ABC             |
+----------------+

SELECT CONVERT('A E I', 'US7ASCII', 'WE8ISO8859P1')
FROM DUAL;
+----------------------------------------+
|CONVERT('AEI','US7ASCII','WE8ISO8859P1')|
+----------------------------------------+
|A E I                                   |
+----------------------------------------+

SELECT DUMP('A')
FROM dual;
+----------------+
|DUMP('A')       |
+----------------+
|Typ=96 Len=1: 65|
+----------------+

SELECT LPAD('ABC', '5', '*')
FROM dual;
+-------------------+
|LPAD('ABC','5','*')|
+-------------------+
|**ABC              |
+-------------------+

SELECT LTRIM('ABC')
FROM dual;
+------------+
|LTRIM('ABC')|
+------------+
|ABC         |
+------------+

SELECT REGEXP_COUNT('1 2 3 abc', '\d')
FROM dual;
+---------------------------+
|REGEXP_COUNT('123ABC','\D')|
+---------------------------+
|3                          |
+---------------------------+


SELECT REGEXP_INSTR('Y2K problem', 'c \d+')
FROM dual;
+---------------------------------+
|REGEXP_INSTR('Y2KPROBLEM','C\D+')|
+---------------------------------+
|0                                |
+---------------------------------+


SELECT REGEXP_REPLACE('Year of 2017', '\d+', 'Dragon')
FROM dual;
+-------------------------------------------+
|REGEXP_REPLACE('YEAROF2017','\D+','DRAGON')|
+-------------------------------------------+
|YEAR OF Dragon                             |
+-------------------------------------------+

SELECT REGEXP_SUBSTR('Number 10', '\d+')
FROM dual;
+-------------------------------+
|REGEXP_SUBSTR('NUMBER10','\D+')|
+-------------------------------+
|10                             |
+-------------------------------+

SELECT REPLACE('JACK AND JOND', 'J', 'BL')
FROM dual;
+-------------------------------+
|REPLACE('JACKANDJOND','J','BL')|
+-------------------------------+
|BLACK AND BLOND                |
+-------------------------------+

SELECT RPAD('ABC', 5, '*')
FROM dual;
+-----------------+
|RPAD('ABC',5,'*')|
+-----------------+
|ABC**            |
+-----------------+

SELECT RTRIM('ABC')
FROM dual;
+------------+
|RTRIM('ABC')|
+------------+
|ABC         |
+------------+

SELECT SOUNDEX('sea')
FROM dual;
+--------------+
|SOUNDEX('SEA')|
+--------------+
|S000          |
+--------------+

SELECT SUBSTR('Oracle Substring', 1, 6)
FROM dual;
+-----------------------------+
|SUBSTR('ORACLESUBSTRING',1,6)|
+-----------------------------+
|Oracle                       |
+-----------------------------+

SELECT TRANSLATE('12345', '143', 'bx')
FROM dual;
+-----------------------------+
|TRANSLATE('12345','143','BX')|
+-----------------------------+
|b2x5                         |
+-----------------------------+

SELECT TRIM('ABC')
FROM dual;
+-----------+
|TRIM('ABC')|
+-----------+
|ABC        |
+-----------+

SELECT UPPER('Abc')
FROM dual;
+------------+
|UPPER('ABC')|
+------------+
|ABC         |
+------------+

-------------------------------------------------------------------

SELECT ADD_MONTHS(DATE '2016-02-29', 1)
FROM dual;
+------------------------------+
|ADD_MONTHS(DATE'2016-02-29',1)|
+------------------------------+
|2016-03-31                    |
+------------------------------+

SELECT CURRENT_DATE
FROM dual;
+-------------------+
|CURRENT_DATE       |
+-------------------+
|2023-04-27 11:27:28|
+-------------------+

SELECT CURRENT_TIMESTAMP
FROM dual;
+---------------------------------+
|CURRENT_TIMESTAMP                |
+---------------------------------+
|2023-04-27 11:27:34.454608 +00:00|
+---------------------------------+

SELECT DBTIMEZONE
FROM dual;
+----------+
|DBTIMEZONE|
+----------+
|+00:00    |
+----------+

SELECT EXTRACT(YEAR FROM SYSDATE)
FROM dual;
+------------------------+
|EXTRACT(YEARFROMSYSDATE)|
+------------------------+
|2023                    |
+------------------------+


SELECT FROM_TZ(TIMESTAMP '2017-08-08 08:09:10', '-09:00')
FROM dual;
+-----------------------------------------------+
|FROM_TZ(TIMESTAMP'2017-08-0808:09:10','-09:00')|
+-----------------------------------------------+
|2017-08-08 08:09:10.000000000 -09:00           |
+-----------------------------------------------+

SELECT LAST_DAY(DATE '2016-02-01')
FROM dual;
+--------------------------+
|LAST_DAY(DATE'2016-02-01')|
+--------------------------+
|2016-02-29                |
+--------------------------+

SELECT LOCALTIMESTAMP
FROM dual;
+--------------------------+
|LOCALTIMESTAMP            |
+--------------------------+
|2023-04-27 11:28:22.788889|
+--------------------------+

SELECT MONTHS_BETWEEN(DATE '2017-07-01', DATE '2017-01-01')
FROM dual;
+-------------------------------------------------+
|MONTHS_BETWEEN(DATE'2017-07-01',DATE'2017-01-01')|
+-------------------------------------------------+
|6                                                |
+-------------------------------------------------+

SELECT NEW_TIME(TO_DATE('08-07-2017 01:30:45', 'MM-DD-YYYY HH24:MI:SS'), 'AST', 'PST')
FROM dual;
+--------------------------------------------------------------------------+
|NEW_TIME(TO_DATE('08-07-201701:30:45','MM-DD-YYYYHH24:MI:SS'),'AST','PST')|
+--------------------------------------------------------------------------+
|2017-08-06 21:30:45                                                       |
+--------------------------------------------------------------------------+

SELECT ROUND(DATE '2017-07-16', 'MM')
FROM dual;
+----------------------------+
|ROUND(DATE'2017-07-16','MM')|
+----------------------------+
|2017-08-01                  |
+----------------------------+

SELECT SESSIONTIMEZONE
FROM dual;
+---------------+
|SESSIONTIMEZONE|
+---------------+
|UTC            |
+---------------+

SELECT SYSDATE
FROM dual;
+-------------------+
|SYSDATE            |
+-------------------+
|2023-04-27 19:29:06|
+-------------------+

SELECT SYSTIMESTAMP
FROM dual;
+---------------------------------+
|SYSTIMESTAMP                     |
+---------------------------------+
|2023-04-27 19:29:13.764644 +08:00|
+---------------------------------+

SELECT TO_CHAR(DATE'2017-01-01', 'DL')
FROM dual;
+------------------------------+
|TO_CHAR(DATE'2017-01-01','DL')|
+------------------------------+
|2017年1月1日 星期日                 |
+------------------------------+

SELECT TO_DATE('01-01-2017', 'DD-MM-YYYY')
FROM dual;
+----------------------------------+
|TO_DATE('01-01-2017','DD-MM-YYYY')|
+----------------------------------+
|2017-01-01                        |
+----------------------------------+

SELECT TRUNC(DATE '2017-07-16', 'MM')
FROM dual;
+----------------------------+
|TRUNC(DATE'2017-07-16','MM')|
+----------------------------+
|2017-07-01                  |
+----------------------------+

SELECT TZ_OFFSET('Europe/London')
FROM dual;
+--------------------------+
|TZ_OFFSET('EUROPE/LONDON')|
+--------------------------+
|+01:00
                    |
+--------------------------+



